package com.example.play.api

import com.example.network.HttpInterceptorType
import com.example.network.HttpManager
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module//如果项目中用了Hilt依赖,一定要加这个
@InstallIn(SingletonComponent::class)
object PlayServerModule {
    @Provides //提供统一实现
    @Singleton //声明为单例
    fun getPlayServerApi():PlayServerApi{
        return HttpManager.createApiServer(PlayServerApi::class.java,HttpInterceptorType.INTERCEPTOR)
    }




}